﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title>团购分利</title>
    <link href="/style/rightdirectory.css" rel="stylesheet" />
    <script src="/script/config.js"></script>
</head>
<style>
    th {
        text-align: center;
    }

    td {
        text-align: center;
    }

    .detail {
        color: darkcyan;
    }
</style>
<body>
    <div class="view-page"> 
        <div class="view-data">
            <table id="table" class="table table-bordered table-hover" data-post="">
                <thead>
                    <tr>
                        <th class="checkboxs">
                            <label class="checkbox-reset">
                                <input type="checkbox" data-checked-table="all" />
                            </label>
                        </th>
                        <th>第一级是合伙人分利</th>
                        <th>第二级是合伙人分利</th>
                        <th>第三级以及无限级给合伙人分利</th>
                        <th>普通第一级分利</th>
                        <th>普通第二级分利</th>
                        <th>团购费用</th>
                        <th>拼团成功返利给团长额度</th>
                        <th>创建时间</th>
                    </tr>
                </thead>
                <tbody></tbody>
            </table>
        </div>
    </div>
</body>

</html>
<script type="text/html" id="tp-table">
    {{set d=list}}
    <tr>
        <td class="checkboxs">
            <label class="checkbox-reset">
                <input type="checkbox" value="{{d.Id}}" onclick="openDetail({{d}})" />
            </label>
        </td>
        <td>{{d.PartnerLevelOneCommission}}</td>
        <td>{{d.PartnerLevelTwoCommission}}</td>
        <td>{{d.PartnerLevelOtherCommission}}</td>
        <td>{{d.CommonLevelOneCommission}}</td>
        <td>{{d.CommonLevelTwoCommission}}</td>
        <td>{{d.GroupBuyingCost}}</td>
        <td>{{d.Rebate}}</td>
        <td>{{d.CreateDate|to_date}}</td>
    </tr>

</script>
<link href="/script/valid/css/tr.css" rel="stylesheet" /><!--判断如：PlatformName格式-->
<script src="/script/valid/form-valid.js?v=2018"></script>
<script type="text/javascript">
    $(function () {
        function _LoadData() {
            var parm = $(".view-search").getFormData();
            $.http.json("customergroupbuyingcommissionconfig/find", parm,
                {
                    pass: function (d) {
                        if (d == null || d == "") {
                            d = {};
                        }
                        $("#table>tbody").append(template("tp-table", {
                            list: d
                        }));
                    }
                })
        }
        _LoadData();//初启化
    })

    function openDetail(d) {  //弹出会员分利
        d = JSON.stringify(d)
        window.location.href = "/views/commission/bulk/edit.html?v=" + d;
        return 
    }
</script>